#include <cstdio>
#include <cmath>
#include <iostream>
using namespace std;

double x, y, r, a, b;
int n, cnt, cnt2;

inline bool InCircle(double p, double q) { 
    return pow(abs(p - x), 2) + pow(abs(q - y), 2) <= pow(r, 2);
}

inline bool InSquare(double p, double q) { 
    return (abs(p - x) <= r) && (abs(q - y) <= r);
}

int main() { 
    ios::sync_with_stdio(false);
    cin >> x >> y >> r >> n;
    for (int i = 1; i <= n; i++) { 
        cin >> a >> b;
        cnt += InCircle(a, b);
        cnt2 += InSquare(a, b);
    }
    printf("%.5lf", (double) cnt * 4 / cnt2);
}
